package com.example.springbootdemo.kafka;


import lombok.extern.log4j.Log4j2;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
@Log4j2
public class KafkaConsumerListener {

    @KafkaListener(topics = "chang-test")
    public void onMessage1(String message) {
        log.info("chang-test接收结果:{}", message);
    }
}


